home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 14
/
014.d81
/
pps #33
< prev
next >
Wrap
Text File
|
2022-08-26
|
2KB
|
121 lines
======================================
PEEKs, POKEs, & SYSes -- Part 33
By James Germany Weiler
and Alien Gardner
======================================
So, now that we know what bits and
bytes are, we should be able to
understand what a bit map is. Put
simply, a bit map is a range of memory
wherein every bit represents the
presence or absence of some object.
Hmmm... that doesn't sound so simple.
I guess we need some examples.
The closest thing to a bit map in
real life is an old-fashioned school
seating chart. The teacher makes a
grid in which each square represents a
student's desk. If a student is
absent, his grid square gets a mark.
Here's a class of sixty-four with
thirteen people absent:
row
Each "*" represents
76543210 a missing student.
........ 0
........ 1
.****... 2 s
.**..*.. 3 e
.**..... 4 a
.**..... 5 t
.**..... 6
........ 7
Now, those thirteen missing students
were not chosen at random.
Individually, each dot may represent a
missing student, but collectively
those missing students are a bit-map
of the letter "r".
It is not just chance that we chose
to put sixty-four students in the
class, either. This classroom is the
analog of one character position on
your monitor screen. That is, each
character you see is made up of a
pattern of 64 light and dark dots in
an eight by eight grid.
Why eight by eight? Well, the
Commodore 64's memory is full of
eight-bit bytes, so it's easiest and
most efficient to arrange things to
fall exactly on byte boundaries.
Let's substitute "bit" and "byte" for
"row" and "seat" in our seating chart
and see what we get...
bit
76543210
........ 0 0 Each "*"
........ 1 0 represents
.****... 2 b 120 a "1" bit.
.**..*.. 3 y 100
.**..... 4 t 96
.**..... 5 e 96
.**..... 6 96
........ 7 0
It appears that the eight bytes
needed to make a bit map of the letter
"r" are 0, 0, 120, 100, 96, 96, 96,
and 0.
-------< continued in Part 34 >-------